<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>百朋后台管理系统</title>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/demo.css">
    <script type="text/javascript" src="__PUBLIC__/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/easyui/jquery.easyui.min.js"></script>
</head>
<script>
    var json="";
</script>
<body>
<div class="report_table">
    <table id="report_table" title="Client Side Pagination" style="width:100%;height:405px" data-options="
                        iconCls: 'icon-edit',
                        rownumbers:true,
                        singleSelect:true,
                        autoRowHeight:false,
                        pagination:true,
                        pageSize:10,
                        toolbar:'#tb',
                        onClickRow: onClickRow">
        <thead>
        <tr>
            <th field="borrow_id" width="10%" align="right" editor='numberbox'>分期编号</th>
            <th field="apply_money" width="10%" align="right" editor='numberbox'>分期金额</th>
            <th field="apply_period" width="10%" align="right" editor='numberbox'>分期期限</th>
            <th field="apply_type" width="10%" align="right" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'lt_code',
								textField:'lt_value',
								method:'get',
								url:'../../Common/Common/loan_type',
								required:true
							}
						}">贷款申请类型</th>
            <th field="apply_date" width="10%" align="right" data-options="editor:{type:'datebox',options:{formatter:myformatter2,parser:myparser2}}">分期申请时间</th>
            <th field="cust_name" width="10%" align="right" editor='textbox'>用户姓名</th>
            <th field="identity_number" width="10%" align="right" editor='numberbox'>用户身份证号码</th>
            <th field="identity_type" width="10%" align="right" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'type_code',
								textField:'typename',
								method:'get',
								url:'../../Common/Common/identity_type',
								required:true
							}
						}">证件类型</th>
            <th field="apply_status" width="10%" align="right" data-options="
                      formatter:function(value,row){
							return value;
						},
						editor:{
							type:'combobox',
							options:{
								valueField:'apply_status',
								textField:'apply_name',
								data:[{'apply_status':'1','apply_name':'申请中'},{'apply_status':'2','apply_name':'已批准'},{'apply_status':'3','apply_name':'未通过'}],
								required:true
							}
						}">分期状态</th>
        </tr>
        </thead>
    </table>
</div>
<div id="tb" style="padding:5px;height:auto">
    <div style="margin-bottom:5px">
        <a href="javscript:;" onclick="exportReport_unline();" class="easyui-linkbutton" iconCls="icon-print" plain="true">导出</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="append()">新增</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" onclick="accept()">确认</a>
    </div>
    <form action="../applyreport/apply_unline" method="post" id="searchTable">
        <div>
            分期申请时间: <input id="month_time" name="month_time" data-options="required:true" value="{$search_array.month_time}">
            分期状态:
            <select class="easyui-combobox selector" id="borrow_status" name="borrow_status" panelHeight="auto" style="width:100px">
                <option value="">请选择</option>
                <volist name="borrow_status" id="borrow_status">
                    <option value="{$borrow_status.ls_id}">{$borrow_status.ls_value}</option>
                </volist>
            </select>
            客户姓名: <input class="easyui-textbox" name="select_name" id="select_name" value="{$search_array.select_name}" data-options="prompt:'搜索姓名...'" style="width:150px"></input>
            <a href="javascript:;" onclick="submitSearch();" class="easyui-linkbutton" iconCls="icon-search">查询</a>
            <a href="javascript:;" onclick="resetSearch();" class="easyui-linkbutton" iconCls="icon-clear">重置</a>
            <script> $(".selector").find("option[value='{$search_array.borrow_status}']").attr("selected",true);</script>
        </div>
    </form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/report/apply_report.js"></script>
<script>
    $(function(){
        var json='{$report_json}';
        var array=eval('('+json+')');
        console.log(array);
        $('#report_table').datagrid({loadFilter:pagerFilter}).datagrid('loadData', array);
    });

</script>
</body>
</html>